<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>服务信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="icon" href="/static/imgs/favicon.ico">
    <link href="/static/plugins/layui/css/layui.css" rel="stylesheet" media="all"/>
    <link href="/static/css/public.css" rel="stylesheet"/>
    <link href="/static/css/store.css" rel="stylesheet"/>
    <link href="/static/css/homepage.css" rel="stylesheet"/>

</head>
<div class="layui-layout">
    <div class="layui-row">
        <ul class="layui-nav layui-bg-cyan">
            <li class="layui-nav-item" style="margin-left: 10%">
                <a href="/">
                    <i class="layui-icon" data-icon="&#xe68e;">&#xe68e;<cite> Home</cite></i>
                </a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <i class="layui-icon" data-icon="&#xe6ed;">&#xe6ed;<cite> 婚庆服务</cite></i>
                </a>
                <dl class="layui-nav-child" id="GoodsType">
                    {% for foo in businesstype %}
                        <dd><a href="{% url 'home:goodsList' %}?goodstype={{ foo.id }}">{{ foo.category }}</a></dd>
                    {% endfor %}
                </dl>
            </li>

            {% if request.user.is_authenticated %}
                <li class="layui-nav-item" style="float: right;margin-right: 10%" id="userInfo">
                    <a href="javascript:;"><cite class="adminName">{{ request.user.username }}</cite></a>
                    <dl class="layui-nav-child">
                        <dd><a href="{% url 'home:changePassword' %}">
                            <i class="seraph icon-xiugai" data-icon="icon-xiugai"></i><cite>修改密码</cite></a>
                        </dd>
                        <dd><a href="{% url 'home:user_info' %}">
                            <i class="seraph icon-chakan" data-icon="icon-chakan"></i><cite>个人信息</cite></a>
                        </dd>
                        <dd><a href="{% url 'userprofile:logout' %}" class="signOut"><i
                                class="seraph icon-tuichu"></i><cite>退出</cite></a></dd>
                    </dl>
                </li>
            {% else %}
                <li class="layui-nav-item" style="float: right;margin-right: 10%">
                    <a href="{% url 'userprofile:admin_login' %}">
                        <i class="layui-icon" data-icon="&#xe612;">&#xe612;<cite> 管理员</cite></i>
                    </a>
                </li>
                <li class="layui-nav-item" style="float: right">
                    <a href="javascript:;">
                        <i class="layui-icon" data-icon="&#xe770;">&#xe770;<cite> 商户</cite></i>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{% url 'userprofile:business_login' %}">商户登录</a></dd>
                        <dd><a href="{% url 'userprofile:business_register' %}">商户注册</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" style="float: right">
                    <a href="javascript:;">
                        <i class="layui-icon" data-icon="&#xe66f;">&#xe66f;<cite> 用户</cite></i>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{% url 'userprofile:user_login' %}">用户登录</a></dd>
                        <dd><a href="{% url 'userprofile:user_register' %}">用户注册</a></dd>
                    </dl>
                </li>
            {% endif %}
        </ul>
    </div>
    <div class="shop-temp">
        <div class="temp-hot">
            <div class="layui-container">
                <div class="layui-card shopdata-intro">
                    <div class="layui-card-body layui-row">
                        <div class="layui-col-md6">
                            <div class="intro-img photos">
                                <img src="/media/{{ goodslists.goodsSrc }}"
                                     alt="{{ goodslists.goodsTitle }}" layer-index="0"></div>
                        </div>
                        <div class="layui-col-md6 template">
                            <div class="intro-txt template">
                                <h1 class="title" style="text-align: left">{{ goodslists.goodsTitle }}</h1>
                                <p class="desc" style="text-align: left">{{ goodslists.description }}</p>
                                <p class="desc" style="text-align: left">价格：{{ goodslists.goodsPrice }}</p>
                                <p class="store-detail-active" id="shopEvent">
                                    <a href="javascript:;" class="store-bg-blue" id="Contact_business">
                                        <i class="layui-icon layui-icon-shop-eye"></i>联系商家</a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-container">
        <div class="layui-row">
            <form class="layui-form layui-form-pane" action="">
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">评论区</label>
                    <div class="layui-input-block">
                        <textarea id="txtcomment" placeholder="请输入评论内容" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn" lay-submit="" lay-filter="comment">发表评论</button>
                </div>
            </form>

        </div>
    </div>
    <div class="layui-container">
        <div class="layui-row">
            <div class="comment_list">
                <h2>全部评论</h2>
                <hr>
                {% for currentComment in currentComments %}
                    <div class="comment">
                        <div class="imgdiv"><img class="imgcss" src="/media/{{ currentComment.user__imgSrc }}"/></div>
                        <div class="conmment_details">
                            <span class="comment_name">{{ currentComment.user__username }}</span>
                                <span>{{ currentComment.created }}</span>
                            <div class="comment_content">{{ currentComment.body }}</div>
                        </div>
                        <hr>
                    </div>
                {% endfor %}
            </div>
            <div class="comment_add_or_last">
                没有更多评论了
            </div>
        </div>
    </div>
    <div class="layui-footer footer">
        <p style="font-family: consolas;"><span>Copyright &copy; {% now "Y" %} Mater  联系我们：18419068159</span></p>
    </div>
    <div id="goodslistsid" style="display: none">{{ goodslists.id }}</div>
    <div id="goodslistsuploadid" style="display: none">{{ goodslists.uploadUser_id }}</div>
</div>
<script>
    var user_islogin = "{{ request.user.is_authenticated }}";
    {#var user_id = "{{ request.user.id }}";#}
</script>
<script src="/static/plugins/layui/layui.js"></script>
<script src="/static/js/home/home.js"></script>
<script src="/static/js/home/goodslist.js"></script>

</body>
</html>